Optimal. Leaf size=59 \[ -\frac {(2 a+3 b) x}{2 b^2}+\frac {(a+b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b^2}+\frac {\cosh (x) \sinh (x)}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3270, 425, 536,
212, 214} \begin {gather*} -\frac {x (2 a+3 b)}{2 b^2}+\frac {(a+b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b^2}+\frac {\sinh (x) \cosh (x)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 214
Rule 425
Rule 536
Rule 3270
Rubi steps
\begin {align*} \int \frac {\sinh ^4(x)}{a+b \cosh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2 \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac {\cosh (x) \sinh (x)}{2 b}-\frac {\text {Subst}\left (\int \frac {-a-2 b+(-a-b) x^2}{\left (1-x^2\right ) \left (a+(-a-b) x^2\right )} \, dx,x,\coth (x)\right )}{2 b}\\ &=\frac {\cosh (x) \sinh (x)}{2 b}+\frac {(a+b)^2 \text {Subst}\left (\int \frac {1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{b^2}-\frac {(2 a+3 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\coth (x)\right )}{2 b^2}\\ &=-\frac {(2 a+3 b) x}{2 b^2}+\frac {(a+b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} b^2}+\frac {\cosh (x) \sinh (x)}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 52, normalized size = 0.88 \begin {gather*} \frac {-4 a x-6 b x+\frac {4 (a+b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a}}+b \sinh (2 x)}{4 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(184\) vs.
\(2(47)=94\).
time = 0.74, size = 185, normalized size = 3.14
method | result | size |
default | \(\frac {2 \left (a^{2}+2 a b +b^{2}\right ) \left (\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )-2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{4 \sqrt {a}\, \sqrt {a +b}}\right )}{b^{2}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {\left (2 a +3 b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2 b^{2}}-\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {1}{2 b \left (\tanh \left (\frac {x}{2}\right )+1\right )}+\frac {\left (-2 a -3 b \right ) \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2 b^{2}}\) | \(185\) |
risch | \(-\frac {a x}{b^{2}}-\frac {3 x}{2 b}+\frac {{\mathrm e}^{2 x}}{8 b}-\frac {{\mathrm e}^{-2 x}}{8 b}+\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}-\frac {2 \sqrt {a \left (a +b \right )}-2 a -b}{b}\right )}{2 b^{2}}+\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}-\frac {2 \sqrt {a \left (a +b \right )}-2 a -b}{b}\right )}{2 a b}-\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}+\frac {2 \sqrt {a \left (a +b \right )}+2 a +b}{b}\right )}{2 b^{2}}-\frac {\sqrt {a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}+\frac {2 \sqrt {a \left (a +b \right )}+2 a +b}{b}\right )}{2 a b}\) | \(189\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 348 vs.
\(2 (47) = 94\).
time = 0.49, size = 348, normalized size = 5.90 \begin {gather*} \frac {{\left (2 \, a + b\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{4 \, \sqrt {{\left (a + b\right )} a} b} - \frac {3 \, \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{16 \, \sqrt {{\left (a + b\right )} a}} - \frac {{\left (2 \, a + b\right )} x}{b^{2}} - \frac {x}{b} + \frac {e^{\left (2 \, x\right )}}{8 \, b} - \frac {e^{\left (-2 \, x\right )}}{8 \, b} + \frac {{\left (2 \, a + b\right )} \log \left (b e^{\left (4 \, x\right )} + 2 \, {\left (2 \, a + b\right )} e^{\left (2 \, x\right )} + b\right )}{8 \, b^{2}} - \frac {{\left (2 \, a + b\right )} \log \left (2 \, {\left (2 \, a + b\right )} e^{\left (-2 \, x\right )} + b e^{\left (-4 \, x\right )} + b\right )}{8 \, b^{2}} + \frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \log \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{32 \, \sqrt {{\left (a + b\right )} a} b^{2}} - \frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{32 \, \sqrt {{\left (a + b\right )} a} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 196 vs.
\(2 (47) = 94\).
time = 0.40, size = 568, normalized size = 9.63 \begin {gather*} \left [\frac {b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} - 4 \, {\left (2 \, a + 3 \, b\right )} x \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} - 2 \, {\left (2 \, a + 3 \, b\right )} x\right )} \sinh \left (x\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2}\right )} \sqrt {\frac {a + b}{a}} \log \left (\frac {b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + 2 \, a b + b^{2}\right )} \sinh \left (x\right )^{2} + 8 \, a^{2} + 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \, {\left (a b \cosh \left (x\right )^{2} + 2 \, a b \cosh \left (x\right ) \sinh \left (x\right ) + a b \sinh \left (x\right )^{2} + 2 \, a^{2} + a b\right )} \sqrt {\frac {a + b}{a}}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + {\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right ) + 4 \, {\left (b \cosh \left (x\right )^{3} - 2 \, {\left (2 \, a + 3 \, b\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right ) - b}{8 \, {\left (b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2}\right )}}, \frac {b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} - 4 \, {\left (2 \, a + 3 \, b\right )} x \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} - 2 \, {\left (2 \, a + 3 \, b\right )} x\right )} \sinh \left (x\right )^{2} + 8 \, {\left ({\left (a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right ) + {\left (a + b\right )} \sinh \left (x\right )^{2}\right )} \sqrt {-\frac {a + b}{a}} \arctan \left (\frac {{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt {-\frac {a + b}{a}}}{2 \, {\left (a + b\right )}}\right ) + 4 \, {\left (b \cosh \left (x\right )^{3} - 2 \, {\left (2 \, a + 3 \, b\right )} x \cosh \left (x\right )\right )} \sinh \left (x\right ) - b}{8 \, {\left (b^{2} \cosh \left (x\right )^{2} + 2 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right ) + b^{2} \sinh \left (x\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 103 vs.
\(2 (47) = 94\).
time = 0.40, size = 103, normalized size = 1.75 \begin {gather*} -\frac {{\left (2 \, a + 3 \, b\right )} x}{2 \, b^{2}} + \frac {e^{\left (2 \, x\right )}}{8 \, b} + \frac {{\left (4 \, a e^{\left (2 \, x\right )} + 6 \, b e^{\left (2 \, x\right )} - b\right )} e^{\left (-2 \, x\right )}}{8 \, b^{2}} + \frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.27, size = 146, normalized size = 2.47 \begin {gather*} \frac {{\mathrm {e}}^{2\,x}}{8\,b}-\frac {{\mathrm {e}}^{-2\,x}}{8\,b}-\frac {x\,\left (2\,a+3\,b\right )}{2\,b^2}+\frac {\ln \left (-\frac {4\,{\mathrm {e}}^{2\,x}\,{\left (a+b\right )}^2}{b^3}-\frac {2\,{\left (a+b\right )}^{3/2}\,\left (b+2\,a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{\sqrt {a}\,b^3}\right )\,{\left (a+b\right )}^{3/2}}{2\,\sqrt {a}\,b^2}-\frac {\ln \left (\frac {2\,{\left (a+b\right )}^{3/2}\,\left (b+2\,a\,{\mathrm {e}}^{2\,x}+b\,{\mathrm {e}}^{2\,x}\right )}{\sqrt {a}\,b^3}-\frac {4\,{\mathrm {e}}^{2\,x}\,{\left (a+b\right )}^2}{b^3}\right )\,{\left (a+b\right )}^{3/2}}{2\,\sqrt {a}\,b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________